﻿class  blog.util_String {
	var tft0:TextFormat;
	var tft1:TextFormat;
	function util_String(common, special) {
		//this['0']
	}
	function init() {
		tft0 = new TextFormat();
		tft0.color = this[0];
		//
		tft1 = new TextFormat();
		tft1.color = this[1];
	}
	function highlight(tf, kw) {
		if (tf.text.indexOf(kw) == -1) {
			return;
		}
		var stt = tf.text.indexOf(kw);
		var end = stt+kw.length
		tf.setTextFormat(tft0);
		tf.setTextFormat(stt, end, tft1);
	}
}
